    /***
     * @description axios封装
     * @file api.ts
     * @author andy
     * @date 2024/3/22 16:40
     */
// file:api.s
// 1、导入axios以及拦截器
import service from './request'

// 发送验证码
export const sendCode = (mobile:any) => {
    return service({
        url: '/auth/index/sendCode/' + mobile,
        method: 'post'
    })
};
// 获取类型ID获取字典数据
export const getDictList = (typeId:any) => {
    return service({
        url: '/goods/index/getDictList/' + typeId,
        method: 'post'
    })
};



// 登录
export const login = (data:any) => {
    return service({
        url: '/auth/index/login',
        method: 'post',
        data
    })
};
// 注册
export const userReg = (data:any) => {
    return service({
        url: '/auth/index/userReg',
        method: 'post',
        data
    })
};
// 商品列表
export const getProdList = (data:any) => {
    return service({
        url: '/goods/index/getProdList',
        method: 'post',
        data
    })
};
// 品牌列表
export const getBrandList = (data:any) => {
    return service({
        url: '/goods/index/getBrandList',
        method: 'post',
        data
    })
};
// 修改品牌状态
export const updateBrandStatus = (data:any) => {
    return service({
        url: '/goods/index/updateBrandStatus',
        method: 'post',
        data
    })
};

// 添加品牌
export const addBrand = (data:any) => {
    return service({
        url: '/goods/index/addBrand',
        method: 'post',
        data
    })
};
// 商品分类列表
export const getTypeList = (data:any) => {
    return service({
        url: '/goods/index/getTypeList',
        method: 'post',
        data
    })
};
// 商家列表
export const getShopperList = (data:any) => {
    return service({
        url: '/auth/index/getShopperList',
        method: 'post',
        data
    })
};
// 添加分类
export const addType = (data:any) => {
    return service({
        url: '/goods/index/addType',
        method: 'post',
        data
    })
};
// 删除商品
export const deleteAll = (data:any) => {
    return service({
        url: '/goods/index/deleteAll',
        method: 'post',
        data
    })
};
// 添加商品
export const addProd = (data:any) => {
    return service({
        url: '/goods/index/addProd',
        method: 'post',
        data
    })
};
// 添加商品附件
export const addAttachment = (data:any) => {
    return service({
        url: '/goods/index/addAttachment',
        method: 'post',
        data
    })
};

// 获取菜单树
export const getMenuTree = () => {
    return service({
        url: '/auth/index/getMenuTree',
        method: 'post',
        
    })
};
// 获取所有品牌
export const getBrandAll = () => {
    return service({
        url: '/goods/index/getBrandAll',
        method: 'post',
        
    })
};
// 获取所有品牌
export const getTypeAll = () => {
    return service({
        url: '/goods/index/getTypeAll',
        method: 'post',
        
    })
};
// 分页订单列表
export const getOrderList = (data:any) => {
    return service({
        url: '/goods/order/getOrderList',
        method: 'post',
        data
    })
};
// 批量删除订单
export const deleteAllOrder = (data:any) => {
    return service({
        url: '/goods/order/deleteAllOrder',
        method: 'post',
        data
    })
};
// 字典列表(分页)
export const getDictListAll = (data:any) => {
    return service({
        url: '/goods/dict/getDictList',
        method: 'post',
        data
    })
};
// 添加表单
export const addOrder = (data:any) => {
    return service({
        url: '/goods/order/addOrder',
        method: 'post',
        data
    })
};
// 获取商品明细信息
export const getProdInfoListAll = (data:any) => {
    return service({
        url: '/goods/index/getProdInfoListAll',
        method: 'post',
        data
    })
};
// 添加商品明细
export const addProdInfo = (data:any) => {
    return service({
        url: '/goods/index/addProdInfo',
        method: 'post',
        data
    })
};

// 获取所有商品明细
export const getProdInfoList = () => {
    return service({
        url: '/goods/index/getProdInfoList',
        method: 'post',
        
    })
};
// 订单记录列表
export const getOrderRecordList = () => {
    return service({
        url: '/goods/order/getOrderRecordList',
        method: 'post',
        
    })
};
// 根据商品ID获取信息
export const getProdById = (prodId:any) => {
    return service({
        url: '/goods/index/getProdById/' + prodId,
        method: 'post'
    })
};
// 拼团活动列表
export const getActiveList = (data:any) => {
    return service({
        url: '/team/index/getActiveList',
        method: 'post',
        data
    })
};
// 添加活动
export const addActive = (data:any) => {
    return service({
        url: '/team/index/addActive',
        method: 'post',
        data
    })
};
// 修改活动
export const updateActive = (data:any) => {
    return service({
        url: '/team/index/updateActive',
        method: 'post',
        data
    })
};
// 批量删除活动
export const deleteAllActive = (data:any) => {
    return service({
        url: '/team/index/deleteAllActive',
        method: 'post',
        data
    })
};
// 单删
export const deleteActive = (data:any) => {
    return service({
        url: '/team/index/deleteActive',
        method: 'post',
        data
    })
};
// 商家活动列表
export const getGroupJoinList = (data:any) => {
    return service({
        url: '/team/index/getGroupJoinList',
        method: 'post',
        data
    })
};
// 删除商家活动
export const deleteGroupJoin = (data:any) => {
    return service({
        url: '/team/index/deleteGroupJoin',
        method: 'post',
        data
    })
};
// 批量删除商家活动
export const deleteAllGroupJoin = (data:any) => {
    return service({
        url: '/team/index/deleteAllGroupJoin',
        method: 'post',
        data
    })
};
// 添加参与活动
export const addGroupJoin = (data:any) => {
    return service({
        url: '/team/index/addGroupJoin',
        method: 'post',
        data
    })
};
// 修改参与活动
export const updateGroupJoin = (data:any) => {
    return service({
        url: '/team/index/updateGroupJoin',
        method: 'post',
        data
    })
};
// 参团列表
export const getGroupList = (data:any) => {
    return service({
        url: '/team/index/getGroupList',
        method: 'post',
        data
    })
};
// 我的拼团订单
export const getMyOrderList = () => {
    return service({
        url: '/team/index/getMyOrderList',
        method: 'post',
        
    })
};
// 删除订单
export const deleteOrder = (data:any) => {
    return service({
        url: '/team/index/deleteOrder',
        method: 'post',
        data
    })
};